using System.ComponentModel;

namespace CPlatePrintSys.Win.Models
{
    public class RoundingRuleModel : INotifyPropertyChanged
    {
        private string _ruleName;
        private string _roundingMethod;
        private bool _isDefault;

        public string RuleName
        {
            get => _ruleName;
            set
            {
                _ruleName = value;
                OnPropertyChanged(nameof(RuleName));
            }
        }

        public string RoundingMethod
        {
            get => _roundingMethod;
            set
            {
                _roundingMethod = value;
                OnPropertyChanged(nameof(RoundingMethod));
            }
        }

        public bool IsDefault
        {
            get => _isDefault;
            set
            {
                _isDefault = value;
                OnPropertyChanged(nameof(IsDefault));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
} 